<!doctype html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta name="keywords" content="">
  <meta name="description" content="">
  <title>注册 小熊猫金服</title>
  <link href="{{'/css/style.css'}}" rel="stylesheet" type="text/css" />
  <link href="{{'/css/login.css'}}" rel="stylesheet" type="text/css" />
  <script src="{{'/js/jquery-1.7.1.min.js'}}" type="text/javascript"></script>
  <script src="{{'/js/js.js'}}" type="text/javascript"></script>
</head>
<body>
<!--header start-->
<div class="header_reg">
  <div class="logo"><a href="/"><img src="{{asset('images/logo_reg.png')}}"/></a></div>
</div>
<!--header end-->

<!--main start-->
<form action="{{url('user/register')}}" method="post">
  {{csrf_field()}}
  <div class="reg_box_w">
    <div class="reg_box">
      @if(session('msg'))
        <p  style="text-align: center; color: red; font-size: 18px;">{{session('msg')}}</p>
      @endif
      <div>
        @if(count($errors)>0)
          @foreach($errors->all() as $error)
            <p style="text-align: center; color: red; font-size: 18px;">{{$error}}</p>
          @endforeach
        @endif
      </div>
      <div class="tit">免费注册账户</div>
      <div class="reg_form">
        <div class="i1_w"><input class="input" name="name" type="text" value="{{old('name')}}"   placeholder="必填项：请输入用户名"/>
        </div>

        <div class="i2_w"><input class="input" name="password" type="password"  value="{{old('password')}}"  placeholder="请输入密码" />
        </div>

        <div class="i2_w"><input class="input" name="password_confirmation" type="password"  value="{{old('password_confirmation')}}"  placeholder="请再次输入密码" />
        </div>

        <div class="i2_w"><input class="input" id="mobile" name="mobile" type="text"  value="{{old('mobile')}}" placeholder="必填项：请输入手机号码" onkeyup='this.value=this.value.replace(/\D/gi,"")'/>
        </div>


        <div class="line">
          <div class="btn_qr"  type="button">获取验证码</div>
          <div class="i3_w"><input class="input_3" name="validateCode" type="" value="{{old('validateCode')}}"  placeholder="请输入手机验证码" />
          </div>

          <div class="clear"></div>
        </div>
       <div class="i2_w">
        <input id="idNo" name="idNo"   class="input" type="text"   value="{{old('idNo')}}"  placeholder="必填项：请输入身份证号码"/>
      </div>

        <div class="about">
          <div class="zd"><input name="agree" type="checkbox"   @if(old('agree') == 'on') checked="checked" @endif id="agree" /> <span>我已经阅读并同意 <a href="{{url('/agreement')}}">《小熊猫金服注册及服务协议》</a></span></div>

        </div>
        <div class="btn_w"><input class="btn"  name="" type="submit" value="立即注册" />
        </div>
        <div class="txt">已有帐号？ <a href="{{url('user/login')}}">登录</a></div>
      </div>
    </div>
  </div>
</form>
<!--main end-->

<!--footer start-->
<!--footer end-->
<script type="text/javascript" language="JavaScript">

  $(function(){
    $(".btn_qr").on('click' , function(){
      $.ajax({
        type: "POST",
        url: "{{url('user/validatecode')}}",
        data: {'mobile':$("#mobile").val(), '_token': '{{csrf_token()}}' }
      }).always(function(data){
        alert(data.content);
      });
    });
  });


</script>

</body>
</html>